package org.example.docsearcher.controller;

import org.example.docsearcher.model.Result;
import org.example.docsearcher.service.SearcherService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/searcher")
public class SearcherController {
    @Autowired
    SearcherService service;
    @RequestMapping("/getInfo")
    public List<Result> getInfo(String query) {
        return service.getInfo(query);
    }
}
